# from celery.schedules import crontab
# from keepback.celery import app  # 从配置文件导入Celery实例
# from utils.crawl_springer import crawl_and_process  # 导入爬取函数
#
# # 定义Celery任务
# @app.task
# def crawl_springer_task():
#     print("开始执行Springer爬取任务...")
#     crawl_and_process()  # 调用爬取和向量处理逻辑
#     print("任务执行完毕")
#
# # 配置定时任务：每天凌晨2点执行
# app.conf.beat_schedule = {
#     "daily-springer-crawl": {
#         "task": "coach.tasks.crawl_springer_task",  # 任务路径（包.模块.函数）
#         "schedule": crontab(hour=2, minute=0),  # 每天凌晨2点
#     }
# }